import os
from pathlib import Path

# 获取当前文件所在目录的绝对路径
current_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# 配置上传和裁剪目录
UPLOAD_DIR = Path(current_dir) / "uploads"
CUT_DIR = Path(current_dir) / "cut_videos"
DOWNLOAD_DIR = Path(current_dir) / "downloads"

# 确保目录存在
UPLOAD_DIR.mkdir(exist_ok=True)
CUT_DIR.mkdir(exist_ok=True)
DOWNLOAD_DIR.mkdir(exist_ok=True)

# 数据库路径
DB_PATH = os.path.join(current_dir, 'appdata', 'sqlite3')

# 存储下载任务信息
TASKS = {}

# 存储裁剪任务信息
CUT_TASKS = {}

# 存储批量裁剪任务信息
BATCH_CUT_TASKS = {} 